public class ArrayDemo05 {
    public static void main(String[] args) {
        // 定义一个10*10大小的数组
        //[{0,1,2,3,4,5,6,7,8,9},{0,1,2,3,4,5,6,7,8,9},{0,0,0,0,0,0,0,0,0,0},{},{},{},{},{},{},{}]
        int[][] nums = new int[10][10];
        // 赋值
        for (int i = 0; i < nums.length; i++) {
            for (int j = 0; j < nums[i].length; j++) {
                nums[i][j] = j;
            }
        }
        /*
            * * * * *
            * * * * *
            * * * * *
            * * * * *
         */
        int sum = 0;
        for (int i = 0; i < nums.length; i++) {
            for (int j = 0; j < nums[i].length; j++) {
                sum += nums[i][j];
            }

        }
        System.out.println(sum);

        

        /*
            i = 0
            j = 0
            nums[0][0] = 0
            j = 1
            nums[0][1] =1
            j = 2
            nums[0][2] = 2
            ....
            j = 9
            nums[0][9] = 9

            -----------
            i=1
            j= 0
            nums[1][0] = 0
            nums[1][9][] = 9


         */
    }
}
